#ifndef __NET_H__
#define __NET_H__
#pragma once
#include "cocos2d.h"
#include "cocos-ext.h"
USING_NS_CC;
USING_NS_CC_EXT;
using namespace std;
class Net :
	public CCObject
{
private:
	CCDictionary* callbackMap;
public:
	Net(void);
	~Net(void);
	static Net* instance();
	void sendRequest(const char* url,const char* codeTag,CCObject* target,SEL_CallFuncO callback);
	void onHttpRequestCompleted(CCHttpClient *sender, CCHttpResponse *response);
};

class CallbackObject : public CCObject{
public:
	CCObject* target;
	SEL_CallFuncO func;
};

static const char* CODEKEY_HOME = "home";
#endif //__NET_H__
